\documentclass[twoside,a4paper]{article}
\usepackage{ctex}
\usepackage{geometry}
\usepackage{anyfontsize}
\usepackage{lmodern}
\geometry{margin=1.5cm, vmargin={0pt,1cm}}
\setlength{\topmargin}{-1cm}
\setlength{\paperheight}{29.7cm}
\setlength{\textheight}{25.3cm}

% useful packages.
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{layout}
\usepackage{cite}
\usepackage{url}
\usepackage{mathrsfs}
\usepackage{tikz}
\usepackage{subcaption}
\usetikzlibrary{shapes, snakes}

% some common command
\newcommand{\dif}{\mathrm{d}}
\newcommand{\avg}[1]{\left\langle #1 \right\rangle}
\newcommand{\difFrac}[2]{\frac{\dif #1}{\dif #2}}
\newcommand{\pdfFrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\OFL}{\mathrm{OFL}}
\newcommand{\UFL}{\mathrm{UFL}}
\newcommand{\fl}{\mathrm{fl}}
\newcommand{\op}{\odot}
\newcommand{\Eabs}{E_{\mathrm{abs}}}
\newcommand{\Erel}{E_{\mathrm{rel}}}

\newtheorem{Theorem}{定理}[section]
\newtheorem{Definition}{定义}[section]
\newtheorem{Lemma}{引理}
\newtheorem{Corollary}{推论}

\newcounter{comment}[section]

\title{第三章理论作业5-8题}
\author{陈楚文}
\date{\today}
\begin{document}
\maketitle

\begin{enumerate}
    \item 第五题：
    \begin{enumerate}
        \item 由递推关系式$B^2_i(x)=\frac{x-t_{i-1}}{t_{i+1}-t_{i-1}}B^1_i(x)+\frac{t_{i+2}-x}{t_{i+2}-t_i}B^1_{i+1}(x)$,
        代入$B^1_i(x) = \widehat{B}_i(x)$,\\ 分别令$x \in (t_{i-1},t_i],(t_i,t_{i+1}],(t_{i+1},t_{i+2}]$以及其他，计算得到如下结果：
        \begin{equation*}
            B^2_i(x)=
            \begin{cases}
                \frac{(x-t_{i-1})^2}{(t_{i+1}-t_{i-1})(t_i-t_{i-1})} & \text{若} x \in (t_{i-1},t_i]; \\
                \frac{(x-t_{i-1})(t_{i+1}-x)}{(t_{i+1}-t_{i-1})(t_{i+1}-t_i)}+
                \frac{(t_{i+2}-x)(x-t_i)}{(t_{i+2}-t_i)(t_{i+1}-t_i)} & \text{若} x \in (t_i,t_{i+1}]; \\
                \frac{(t_{i+2}-x)^2}{(t_{i+2}-t_i)(t_{i+2}-t_{i+1})} & \text{若} x \in (t_{i+1},t_{i+2}]; \\
                0 & \text{其他}.
            \end{cases}
        \end{equation*}
        \item 分别计算$B^2_i(x)$在$x=t_i,t_{i+1}$的左右导数
        \begin{gather*}
            (B^2_i(t_i))'_-=(B^2_i(t_i-0))'=\frac{2}{t_{i+1}-t_{i-1}}; \\
            (B^2_i(t_i))'_+=(B^2_i(t_i+0))'=\frac{2}{t_{i+1}-t_{i-1}}; \\
            (B^2_i(t_{i+1}))'_-=(B^2_i(t_{i+1}-0))'=\frac{-2}{t_{i+2}-t_i}; \\
            (B^2_i(t_{i+1}))'_+=(B^2_i(t_{i+1}+0))'=\frac{-2}{t_{i+2}-t_i}; \\
        \end{gather*}
        因此$B^2_i(x)$的导数在$x=t_i,t_{i+1}$连续。
        \item 显然当$x^* \in (t_{i-1},t_i],(B^2_i(x^*))' \neq 0$,在$x \in (t_i,t_{i+1})$中，令$\frac{d B^2_i(x)}{d x}=0$
        得到$x=\frac{t_{i+2}t_{i+1}-t_it_{i-1}}{t_{i+2}+t_{i+1}-t_{i}-t_{i-1}}$,验证可知$x^* \in (t_i,t_{i+1})$.
        \item 令i=0，画出$B_0^2(x)$图像如下：
        \begin{figure}[htbp]
            \centering
            \includegraphics[width=6cm,height=5.5cm]{b1.PNG}
        \end{figure}
        \item 分别令$i=0,1,2,3,4,5$并画出图像:
        \begin{figure}[H]
            \centering
            \includegraphics[width=6cm,height=5.5cm]{b2.PNG}
        \end{figure}
    \end{enumerate}
    \item 第六题：将差商用递推公式计算
    \begin{align*}
        LHS ={} & [t_i,t_{i+1},t_{i+2}](t-x)^2_+-[t_{i-1},t_i,t_{i+1}](t-x)^2_+ \\
            ={} & \frac{[t_{i+1},t_{i+2}](t-x)^2_+-[t_i,t_{i+1}](t-x)^2_+}{t_{i+2}-t_i}-
                  \frac{[t_{i},t_{i+1}](t-x)^2_+-[t_{i-1},t_{i}](t-x)^2_+}{t_{i+1}-t_{i-1}} 
    \end{align*}
    而$[t_{i-1},t_i](t-x)^2_+=\frac{(t_i-x)^2_+-(t_{i-1}-x)^2_+}{t_i-t_{i-1}}$,分子其他三项类似,分别令$x \in (t_{i-1},t_i],(t_i,t_{i+1}],(t_{i+1},t_{i+2}]$以及其他,
    计算即得到左式等于右式。
    \item 第七题:
        由$\frac{d}{dx}B_i^n(x)=\frac{nB_i^{n-1}(x)}{t_{i+n-1}-t_{i-1}}-\frac{nB_{i+1}^{n-1}(x)}{t_{i+n}-t_i}$可知：
        \begin{align*}
            \int_{t_{i-1}}^{t_{i+n+1}} \frac{d}{dx}B_i^{n+1}(x) \,dx 
            ={} & \int_{t_{i-1}}^{t_{i+n+1}} \frac{(n+1)B_i^n(x)}{t_{i+n}-t_{i-1}} \,dx - \\
            \int_{t_{i-1}}^{t_{i+n+1}} \frac{(n+1)B_{i+1}^n(x)}{t_{i+n+1}-t_i} \,dx 
            ={} & \int_{t_{i-1}}^{t_{i+n}} \frac{(n+1)B_i^n(x)}{t_{i+n}-t_{i-1}} \,dx - \\
            \int_{t_{i}}^{t_{i+n+1}} \frac{(n+1)B_{i+1}^n(x)}{t_{i+n+1}-t_i} \,dx 
        \end{align*}
        而左式的值$LHS=B_i^{n+1}(t_{i+n+1})-B_i^{n+1}(t_{i-1})=0$,因此有
        \begin{equation*}
            \int_{t_{i-1}}^{t_{i+n}} \frac{(n+1)B_i^n(x)}{t_{i+n}-t_{i-1}} \,dx = 
            \int_{t_{i}}^{t_{i+n+1}} \frac{(n+1)B_{i+1}^n(x)}{t_{i+n+1}-t_i} \,dx 
        \end{equation*}
        令$g(i) = \int_{t_{i-1}}^{t_{i+n}} \frac{(n+1)B_i^n(x)}{t_{i+n}-t_{i-1}} \,dx $, 上式告诉我们$g(i)=g(i+1)$,因此积分与$i$无关，即
        $\int_{t_{i-1}}^{t_{i+n}} \frac{B_i^n(x)}{t_{i+n}-t_{i-1}} \,dx = \frac{c}{n+1}$,其中$c$为常数。
    \item 第八题：
    \begin{enumerate}
        \item 完全对称多项式$\tau_2(x_i,x_{i+1},x_{i+2})=x_i^2+x_{i+1}^2+x_{i+2}^2+x_ix_{i+1}+x_ix_{i+2}+x_{i+1}x_{i+2}$.
        单项式$x^4$的差商表如下：
        \begin{table}[htbp]
            \centering
            \begin{tabular}{r|lccc}
                $x_i$ & $x_i^4$ \\
                $x_{i+1}$ & $x_{i+1}^4$ & $x_i^3+x_i^2x_{i+1}+{x_i}x_{i+1}^2+x_{i+1}^3$ \\
                $x_{i+2}$ & $x_{i+2}^4$ & $x_{i+1}^3+x_{i+1}^2x_{i+2}+x_{i+1}x_{i+2}^2+x_{i+2}^3$ & $x_i^2+x_{i+1}^2+x_{i+2}^2+x_ix_{i+1}+x_ix_{i+2}+x_{i+1}x_{i+2}$
            \end{tabular}
        \end{table}
        \newline
        因此$\tau_2(x_i,x_{i+1},x_{i+2}) = [x_i,x_{i+1},x_{i+2}]x^4$
        \item 证明：由引理
        \begin{align*}
            (x_{n+1}-x_1)\tau_k(x_1,\ldots,x_n,x_{n+1}) ={} & \tau_{k+1}(x_1,\ldots,x_{n+1})-\tau_{k+1}(x_1,\ldots,x_n)-\\
            & x_1\tau_k(x_1,\ldots,x_{n+1})\\
            = {} & \tau_{k+1}(x_2,\ldots,x_{n+1})+x_1\tau_k(x_1,\ldots,x_{n+1})-\\
            & \tau_k(x_1,\ldots,x_n)-x_1\tau_k(x_1,\ldots,x_{n+1})\\
            = {} & \tau_{k+1}(x_2,\ldots,x_{n+1})-\tau_{k+1}(x_1,\ldots,x_n).
        \end{align*}
        由归纳法，当$n=0,\quad \tau_m(x_i)=[x_i]x^m$自然成立。假设当$n<m$,结论成立，则
        \begin{align*}
            \tau_{m-n-1}(x_i,\ldots,x_{i+n+1})
            = {} & \frac{\tau_{m-n}(x_{i+1},\ldots,x_{i+n+1})-\tau_{m-n}(x_i,\ldots,x_{i+n})}{x_{i+n+1}-x_i}\\
            = {} & \frac{[x_{i+1},\ldots,x_{i+n+1}]x^m-[x_i,\ldots,x_{i+n}x^m]}{x_{i+n+1}-x_i}\\
            = {} & [x_i,\ldots,x_{i+n+1}]x^m
        \end{align*}
        因此结论成立。
    \end{enumerate}
\end{enumerate}
\end{document}